package com.yhsimon.repository;


import com.yhsimon.entity.Advice;
import com.yhsimon.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserRepository {
    public List<User> findAll(int index, int limit);

    public int count();

    public void save(User user);

    public void deleteById(int  id);

    public void update(User user);

    public User findById(int id);

    void advice(@Param("name") String name, @Param("advice") String advice);

    int count2();

    List<Advice> findAllAdvice(int index, int limit);

    void deleteAdviceById(int id);

    User findByName(@Param("userName") String userName);
}
